import type { RouteRecordWithMenuItem } from "@/router/types";

import BasicLayout from "@/layouts/BasicLayout";

import Analysis from "@/views/dashboard/analysis";
import Monitor from "@/views/dashboard/monitor";

/**
 * {
 *    path: "/",
 *    key: "", // 用于左侧菜单，是一个必须的，需要唯一。我们这儿传递跳转的to路径
 *    label: "", // 用于左侧菜单，展示菜单名称的,
 *    icon: <Xxx />, // 用于左侧菜单，展示图标的。
 *    element: <Xxx />, // 用于路由的展示的组件
 *    children: [], // 用于路由的子路由，也是控制左侧菜单的子菜单
 * }
 */
export default {
  path: "/dashboard",
  key: "/dashboard",
  label: "Dashboard",
  sort: 10,
  element: <BasicLayout />,
  children: [
    {
      path: "analysis",
      key: "/dashboard/analysis",
      label: "分析页",
      element: <Analysis />,
    },
    {
      path: "monitor",
      key: "/dashboard/monitor",
      label: "监控页",
      element: <Monitor />,
    },
  ],
} as RouteRecordWithMenuItem;
